package com.op.parcel.manage.modules.sys.wrapper;

import com.op.parcel.boot.support.BaseEntityWrapper;
import com.op.parcel.manage.modules.sys.entity.UserRole;
import com.op.parcel.manage.modules.sys.vo.UserRoleVO;
import lombok.AllArgsConstructor;
import org.springframework.beans.BeanUtils;

/**
 * 包装类,返回视图层所需的字段
 *
 * @author xuan
 * @since 2019-01-09
 */
@AllArgsConstructor
public class UserRoleWrapper extends BaseEntityWrapper<UserRole, UserRoleVO> {

	@Override
	public UserRoleVO entityVO(UserRole userRole) {
		UserRoleVO userRoleTarget = new UserRoleVO();
		BeanUtils.copyProperties(userRole, userRoleTarget);
		return userRoleTarget;
	}

}
